const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  publicPath: "./",
  devServer: {
    hot: true,
    open: true,
    client: {
      overlay: false
    },
    historyApiFallback: {
      index: '/index.html'
    },
    proxy: {
      '/api': {
        //target: 'http://192.168.1.161:18818',
        target: 'http://ornament.cpzsyun.com:84/api',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      },
      //配置天地图接口代理
      '/tdt': {
        target: 'https://api.tianditu.gov.cn',
        changeOrigin: true,
        pathRewrite: {
          '^/tdt': ''
        }
      }
    }
  }
})
